<?php

include('db.php');

$username=$_POST["username"];

$db = new db();

$result= $db->query("SELECT * FROM user_message1 WHERE user='$username'");

if($row = mysql_num_rows($result)==1){
while($row = mysql_fetch_row($result))
{
    $user    = $row[0];
    $message = $row[1];

    echo "Name :$user <br>" .
         "Message : $message <br>" ;
}}else{
echo("conection denied!!!!!!!!");
}
?>
